package com.lmx.repoDomain.tmodel;

import io.katharsis.resource.annotations.JsonApiResource;
import io.katharsis.resource.annotations.JsonApiToOne;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

/**
 * 用于拓展customer的字段
 *
 * @author ytche
 * @date 2017年7月11日
 *
 */
@Entity
@JsonApiResource(type = "customerExtend")
@Table(name = "tnb_customer_extend")
public class CustomerExtend extends BaseEntity {

	private static final long serialVersionUID = 1L;

	private Scheme scheme;
	private Customer customer;

	// 康颐需求修改,梁哥要求加10个拓展字段
	private String remark1;
	private String remark2;
	private String remark3;
	private String remark4;
	private String remark5;
	private String remark6;
	private String remark7;
	private String remark8;
	private String remark9;
	private String remark0;

	// 康颐需求修改,梁哥要求加5个个人特点拓展字段
	private String characteristic0;
	private String characteristic1;
	private String characteristic2;
	private String characteristic3;
	private String characteristic4;
	private String characteristic5;
	private String characteristic6;
	private String characteristic7;
	private String characteristic8;
	private String characteristic9;

	private String interest; // 兴趣爱好
	private String dietFeatures; // 饮食特点
	private String character; // 性格提点
	private String taboo; // 反感忌讳
	private String experiences; // 人生经历
	
	private String drugAllergy;  // 药物过敏史
	private String presentIllness; //现病史
	private String pastHistory; //既往史

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@Fetch(FetchMode.JOIN)
	@JoinColumn(name = "scheme_id", foreignKey = @ForeignKey(name = "null"))
	public Scheme getScheme() {
		return scheme;
	}

	public void setScheme(Scheme scheme) {
		this.scheme = scheme;
	}

	@JsonApiToOne
	@OneToOne(cascade = CascadeType.REFRESH)
	@JoinColumn(name = "customer_id")
	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public String getRemark1() {
		return remark1;
	}

	public void setRemark1(String remark1) {
		this.remark1 = remark1;
	}

	public String getRemark2() {
		return remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	public String getRemark3() {
		return remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	public String getRemark4() {
		return remark4;
	}

	public void setRemark4(String remark4) {
		this.remark4 = remark4;
	}

	public String getRemark5() {
		return remark5;
	}

	public void setRemark5(String remark5) {
		this.remark5 = remark5;
	}

	public String getRemark6() {
		return remark6;
	}

	public void setRemark6(String remark6) {
		this.remark6 = remark6;
	}

	public String getRemark7() {
		return remark7;
	}

	public void setRemark7(String remark7) {
		this.remark7 = remark7;
	}

	public String getRemark8() {
		return remark8;
	}

	public void setRemark8(String remark8) {
		this.remark8 = remark8;
	}

	public String getRemark9() {
		return remark9;
	}

	public void setRemark9(String remark9) {
		this.remark9 = remark9;
	}

	public String getRemark0() {
		return remark0;
	}

	public void setRemark0(String remark0) {
		this.remark0 = remark0;
	}

	public String getCharacteristic1() {
		return characteristic1;
	}

	public void setCharacteristic1(String characteristic1) {
		this.characteristic1 = characteristic1;
	}

	public String getCharacteristic2() {
		return characteristic2;
	}

	public void setCharacteristic2(String characteristic2) {
		this.characteristic2 = characteristic2;
	}

	public String getCharacteristic3() {
		return characteristic3;
	}

	public void setCharacteristic3(String characteristic3) {
		this.characteristic3 = characteristic3;
	}

	public String getCharacteristic4() {
		return characteristic4;
	}

	public void setCharacteristic4(String characteristic4) {
		this.characteristic4 = characteristic4;
	}

	public String getCharacteristic0() {
		return characteristic0;
	}

	public void setCharacteristic0(String characteristic0) {
		this.characteristic0 = characteristic0;
	}

	public String getCharacteristic5() {
		return characteristic5;
	}

	public void setCharacteristic5(String characteristic5) {
		this.characteristic5 = characteristic5;
	}

	public String getCharacteristic6() {
		return characteristic6;
	}

	public void setCharacteristic6(String characteristic6) {
		this.characteristic6 = characteristic6;
	}

	public String getCharacteristic7() {
		return characteristic7;
	}

	public void setCharacteristic7(String characteristic7) {
		this.characteristic7 = characteristic7;
	}

	public String getCharacteristic8() {
		return characteristic8;
	}

	public void setCharacteristic8(String characteristic8) {
		this.characteristic8 = characteristic8;
	}

	public String getCharacteristic9() {
		return characteristic9;
	}

	public void setCharacteristic9(String characteristic9) {
		this.characteristic9 = characteristic9;
	}

	public String getInterest() {
		return interest;
	}

	public void setInterest(String interest) {
		this.interest = interest;
	}

	@Column(name = "diet_features")
	public String getDietFeatures() {
		return dietFeatures;
	}

	public void setDietFeatures(String dietFeatures) {
		this.dietFeatures = dietFeatures;
	}

	@Column(name = "characteristic")
	public String getCharacter() {
		return character;
	}

	public void setCharacter(String character) {
		this.character = character;
	}

	@Column(name = "taboo")
	public String getTaboo() {
		return taboo;
	}

	public void setTaboo(String taboo) {
		this.taboo = taboo;
	}

	@Column(name = "experiences")
	public String getExperiences() {
		return experiences;
	}

	public void setExperiences(String experiences) {
		this.experiences = experiences;
	}

	@Column(name = "drugAllergy")
	public String getDrugAllergy() {
		return drugAllergy;
	}

	public void setDrugAllergy(String drugAllergy) {
		this.drugAllergy = drugAllergy;
	}
	@Column(name = "presentIllness")
	public String getPresentIllness() {
		return presentIllness;
	}

	public void setPresentIllness(String presentIllness) {
		this.presentIllness = presentIllness;
	}
	@Column(name = "pastHistory")
	public String getPastHistory() {
		return pastHistory;
	}

	public void setPastHistory(String pastHistory) {
		this.pastHistory = pastHistory;
	}
}
